Skip to content

lzma: update to version 26.01#76

Open
illwieckz wants to merge 1 commit into
masterfrom
illwieckz/lzma
Open

lzma: update to version 26.01#76
illwieckz wants to merge 1 commit into
masterfrom
illwieckz/lzma

Conversation

@illwieckz
Copy link
Copy Markdown
Member

That's an old branch sitting on my computer, updating the very old LZMA shipped with crunch with the last one from upstream.

What annoys me is that Crunch is a C++ library but it shipped with the C LZMA library, adding custom wrapping code to make it compilable with a C++ compiler. I don't want to have to replay such change on every LZMA update, so I included it as a C library, meaning I had to make Crunch not only a C++ project but a C++ & C project, meaning selecting a different compiler requires to select both the C++ and C compiler…

An alternative would be to move to the C++ LZMA library but then that requires to port the code to the C++ LZMA API I guess… and I'm lazy. All I want is to make sure we use latest versions of libraries and don't sit on very old dependencies with potential unfixed decades-old issues.

@illwieckz
Copy link
Copy Markdown
Member Author

New versions of LZMA are distributed as 7z archives here:

If someones wants to investigate the C++ library, it can be found in the CPP/ folder of the LZMA source archive.

Comment thread crnlib/lzma/Ppmd7Enc.c Fixed
@illwieckz illwieckz force-pushed the illwieckz/lzma branch 4 times, most recently from 5ee90e3 to 7956a47 Compare January 29, 2025 13:22
@illwieckz illwieckz force-pushed the illwieckz/lzma branch 2 times, most recently from 1acda32 to 6a6b5a7 Compare March 5, 2025 13:31
Comment thread crnlib/lzma/Bcj2Enc.c Outdated
do
p->temp[i] = src[i];
while (++i != rem);
while (++i != rem + 1);
Copy link
Copy Markdown
Member

@slipher slipher Mar 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't any make any sense. How would you fix a buffer overflow by making it copy MORE data?

I suggest not making any local edits to 3rd-party libraries unless it is truly necessary.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

@illwieckz
Copy link
Copy Markdown
Member Author

Rebased and updated to LZMA SDK 26.01.

@illwieckz illwieckz changed the title lzma: update to version 24.09 lzma: update to version 26.01 May 18, 2026
@slipher
Copy link
Copy Markdown
Member

slipher commented May 18, 2026

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants